

@section('content')
<!--Slides-->
<div id="supersized"></div>
@stop

@section('script')
<script type="text/javascript">
$(function(){
	
        $.supersized({
			
			// Functionality
			slide_interval          :   3000,		// Length between transitions
			transition              :   1, 			// 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
			transition_speed		:	700,		// Speed of transition
													   
			// Components							
			slide_links				:	'blank',	// Individual links for each slide (Options: false, 'num', 'name', 'blank')
			slides : [
				      @foreach($banners as $banner)
				      	{image : '{{Images::url($banner->image)}}' , url : '{{$banner->url}}'},
				        @endforeach
					]
        });
});
function init(){
	var w = $(window).width();
	var h = $(window).height();
	//console.log('w='+w+",h="+h+",bw="+$("body").width()+",bh="+$("body").height()+",dw="+$(document).width()+",dh="+$(document).height());
	$(".am-slider img").each(function(){
		var $img = $(this);
		var url = $img.data('src')+"@"+w+"w_"+h+"h_1c_1e";
		$("<img />").bind("load",function() {
			$img.hide().attr("src",url).fadeIn(1000);
		})
		.attr("src",url);
	});
}
//init();
</script>
@stop;
